package com.xiaoma.javaconfig;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author xiaoma
 * @date 2020-02-27 21:22
 */
@Component
public class MyCompont {

    Person person;

    public Person getPerson() {
        return person;
    }

    @Autowired
    public void setPerson(Person person) {
        this.person = person;
    }

    public void print(){
        person.print();
    }
}
